`find` command not available in web host, how to implement a delete based on modification time using other commands?
Posted
by
CalumJEadie
on Server Fault
See other posts from Server Fault
or by CalumJEadie
Published on 2012-03-27T22:58:43Z
Indexed on
2012/03/27
23:32 UTC
Read the original article
Hit count: 113
I'm creating a simple datebase backup solution for a client using web hosting at DataFlame.
The web hosting account provides access to cron but not a shell.
I have a database backup script creating regular backups and I want to automatically remove those more than N days old.
I attempted to use
find -v $backup_dir -mtime +$keep_days -name "*db.tar.gz" -delete
however the user executing the script does not have permission to run find
.
Can you suggest how to implement this without using the find
command?
© Server Fault or respective owner